#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int func(int n){
	int ret = -1;
	if ((unsigned)n>80){
		return ret;
	}
	else{
		ret = n + 7;
		if (n<0){
			n = ret;
		}
		n = n >> 3;
		n = n - 6;
		ret = 1;
		if ((unsigned)n>4){
			return ret;
		}
		else{
			switch ((unsigned)n){
			case 0:
				ret = 2;
				break;
			case 1:
				ret = 3;
				break;
			case 2:
				ret = 4;
				break;
			case 4:
			case 5:
				ret = 5;
				break;
			}
		}
		return ret;
	}
}
int main(){
	int n;
	scanf("%d", &n);
	printf("%d\n", func(n));
	return 0;
}